package com.example.sfm.pojo.entity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.io.Serializable;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author sfm
 * @since 2025-03-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("student_records")
@Schema(name="StudentRecords对象",description = "学生档案表")
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class StudentRecords implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "档案ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "对应用户ID")
    private Integer userId;

    @Schema(description = "学号")
    private String studentNumber;

    @Schema(description = "性别（0=未知, 1=男, 2=女）")
    private Integer gender;

    @Schema(description = "班级id")
    private Integer classId;

    @Schema(description = "出生日期")
    private LocalDate birthDate;

    @Schema(description = "国籍")
    private String nationality;

    @Schema(description = "政治面貌")
    private String politicalStatus;

    @Schema(description = "入学日期")
    private LocalDate admissionDate;

    @Schema(description = "所属学院")
    private String department;

    @Schema(description = "专业")
    private String major;

    @Schema(description = "班级")
    private String className;

    @Schema(description = "平均绩点")
    private BigDecimal gpa;

    @Schema(description = "学籍状态（0=在读, 1=毕业, 2=退学, 3=休学）")
    private Integer status;

    @Schema(description = "家庭地址")
    private String address;

    @Schema(description = "监护人姓名")
    private String guardianName;

    @Schema(description = "监护人电话")
    private String guardianPhone;

    @Schema(description = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @Schema(description = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;


}
